import request from '@/utils/request'

// 文章列表
export function xhrListArticles(params) {
  return request({
    url: '/jw/content/articles',
    method: 'get',
    params
  })
}

// update
export function xhrUpdateArticle(data) {
    return request({
        url: '/jw/content/article',
        method: 'put',
        data
    })
}

// delete
export function xhrDeleteArticle(data) {
    return request({
        url: '/jw/content/article/',
        method: 'delete',
        data
    })
}

// 话题列表
export function xhrTopicList(params) {
    return request({
        url: '/topic',
        method: 'get',
        params
    })
}

// 机器人列表
export function xhrRandomRobot() {
    return request({
        url: '/jw/content/robot/random',
        method: 'get'
    })
}

// 机器人简单信息
export function xhrRobotInfo(uid) {
    return request({
        url: '/user/robot/' + uid,
        method: 'get'
    })
}

// 加入推荐
export function xhrPublishContent(data) {
    return request({
        url: '/jw/content/article/recommend',
        method: 'post',
        data
    })
}


// 加入推荐
export function xhrAddComment(data) {
    return request({
        url: '/twitter/comment',
        method: 'post',
        data
    })
}